<template>
  <div>
<van-search  placeholder="请输入搜索关键词" />
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
  <van-swipe-item v-for="(item,index) in swiper" :key="index">
         <img :src="item"/>
  </van-swipe-item>
</van-swipe>
  </div>
</template>
<script>
export default {
  data(){
    return{
       swiper:[]
    }
  },
  mounted(){
    this.$axios.get("/data.json").then((res)=>{
      this.swiper=res.data.swiper.img;
    })
  }
}
</script>
<style  scoped>
 .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    height: 200px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
  }
  img{
    width: 100%;
    height: 200px;
  }
</style>